Helpful Information
 
 
Category: Java and JSP
"java.lang.NullPointerException: null pData" in applet in NS6.2.1

I have an applet that acts as an HTTP client that connects to a server. The server response is passed to JavaScript to render it to the page.



...
ResultString = objFAttach.executeReq(Data);
if (ResultString) displayHtmlResponse(ResultString);
}

function displayHtmlResponse(response){
document.open();
document.write(response);
document.close();
}


when executed in Netscape 6.2.1, the error below occurs on the Java Plugin 1.4 console. The error occurs because when the document.write statement is executed, the page is replaced so the applet is stopped and destroyed. I've got nothing in the stop() and destroy() method in the applet except for just printing text for testing purposes. This is the error in the console:




stopping applet...
destroying applet...
java.lang.NullPointerException: null pData
at sun.awt.windows.WFramePeer.getState(Native Method)
at java.awt.Frame.getExtendedState(Frame.java:731)
at java.awt.Frame.getState(Frame.java:706)
at java.awt.Frame.removeNotify(Frame.java:853)
at java.awt.Window$1$DisposeAction.run(Window.java:539)
at java.awt.Window.dispose(Window.java:552)
at sun.plugin.viewer.frame.WNetscapeEmbeddedFrame.windowClosing(WNetscapeEmbeddedFrame.java:96)
at java.awt.Window.processWindowEvent(Window.java:1102)
at java.awt.Window.processEvent(Window.java:1061)
at java.awt.Component.dispatchEventImpl(Component.java:3598)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Window.dispatchEventImpl(Window.java:1585)
at java.awt.Component.dispatchEvent(Component.java:3439)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)



This only happens the FIRST time the applet is loaded. But in IE, NS 7, Moz1.0, this does not happen at all.

Is this a bug for NS6.2.1?










privacy (GDPR)